import {FormRule} from 'antd'
export type LoginFormType = {
  username: string
  password: string
}

type LoginFormsTypeLabel = keyof LoginFormType

export type LoginFormsType<T = LoginFormsTypeLabel> = {
  label: string,
  name: [T],
  rules: FormRule[]
}


export interface RegisterFormType extends LoginFormType{
  phone: string
}

export type RegisterFormItemType = keyof RegisterFormType

export interface UserType {
  id: number
  phone: string
  username: string
}

export interface LoginType {
  token: string
  user: UserType
}


